package fun.formoji.alg.api;


import fun.formoji.alg.api.fallback.OfflineAlgApiFallBackFactory;
import fun.formoji.alg.resp.CouponScoreResultVo;
import fun.formoji.alg.resp.GbdtAlgResultVo;
import fun.formoji.alg.resp.LfmAlgResultVo;
import fun.formoji.alg.resp.ShoppingBasketResultVo;
import fun.formoji.commons.model.RestResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <code>OfflineAlgApi</code>
 * <desc>
 * 描述：
 * <desc/>
 * <b>Creation Time:</b> 2020/12/17 17:38.
 *
 * @author hshe
 */
@FeignClient(
        value = "alg-service",
        path = "/offlineAlg",
        contextId = "OfflineAlgApi",
        fallbackFactory = OfflineAlgApiFallBackFactory.class
)
public interface OfflineAlgApi {

    @GetMapping("/lfm")
    RestResponse<LfmAlgResultVo> lfm(@RequestParam String userId);

    @GetMapping("/gbdt")
    RestResponse<GbdtAlgResultVo> gbdt(@RequestParam String userId);

    @GetMapping("/couponScore")
    RestResponse<CouponScoreResultVo> couponScore(@RequestParam String userId);

    @GetMapping("/shoppingBasket")
    RestResponse<ShoppingBasketResultVo> shoppingBasket(@RequestParam List<String> itemIds);
}
